import { Component, Input } from '@angular/core';
import { FolderDetailsDto } from '../../dto/folderDetailsDto';
import { MatButtonModule } from '@angular/material/button';
import { MatMenuModule } from '@angular/material/menu';
import { auth } from 'ispace.core.main';
import { CoreService } from '../../service/core.service'; 
import { CommonModule } from '@angular/common';
import {
  MatDialog, 
} from '@angular/material/dialog'; 
import { openWithFolder } from 'ispace_doa';

@Component({
  selector: 'app-menubar-cmp',
  standalone: true,
  imports: [MatButtonModule, MatMenuModule, CommonModule],
  templateUrl: './menubar-cmp.component.html',
  styleUrl: './menubar-cmp.component.scss'
})
export class MenubarCmpComponent {

  logout() {
    auth.logout();
    window.location.reload();
  }
  
  isDesktop = () => {  
    return this.coreSvc.env.value=='desktop';
  } 

  constructor(public coreSvc: CoreService, public dialog: MatDialog) { 
    
  }
 

  openInDesktop= async () => { 
    await openWithFolder(this.coreSvc.path.value.path);
  }

 
 


}
